﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WinnerCMS.Data.Mapping
{
    public partial class PaymentMethodMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WinnerCMS.Model.PaymentMethod>
    {
        public PaymentMethodMap()
        {
            // table
            //ToTable("CMS_PaymentMethod");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.MethodName)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.AccountsId)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.Md5)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.Rate)
                
                .HasPrecision(18, 0)
                .IsOptional();
            Property(t => t.OrderId)
                
                .IsOptional();
            Property(t => t.Pass)
                
                .IsRequired();
            Property(t => t.IsDefault)
                
                .IsRequired();
            Property(t => t.Admin)
                
                .HasMaxLength(50)
                .IsRequired();
            Property(t => t.Interface)
                
                .IsOptional();
            Property(t => t.ParentId)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.EMail)
                
                .HasMaxLength(50)
                .IsOptional();

            // Relationships

            //InitializeMapping();
        }
    }
}

